ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeFiller/src/FillMitTree.cc
(Generate patch)

Comparing UserCode/MitProd/TreeFiller/src/FillMitTree.cc (file contents):
Revision 1.3 by loizides, Thu Jun 19 16:53:43 2008 UTC vs.
Revision 1.63 by pharris, Thu Nov 24 11:40:40 2011 UTC

# Line 2 | Line 2
2  
3   #include "MitProd/TreeFiller/interface/FillMitTree.h"
4   #include "FWCore/MessageLogger/interface/MessageLogger.h"
5 + #include "FWCore/ParameterSet/interface/ParameterSet.h"
6   #include "FWCore/ServiceRegistry/interface/Service.h"
7 < #include "MitProd/TreeService/interface/TreeService.h"
7 > #include "MitProd/ObjectService/interface/ObjectService.h"
8 > #include "MitProd/TreeFiller/interface/AssociationMaps.h"
9 > #include "MitProd/TreeFiller/interface/FillerBasicClusters.h"
10 > #include "MitProd/TreeFiller/interface/FillerBeamSpot.h"
11 > #include "MitProd/TreeFiller/interface/FillerCaloJets.h"
12 > #include "MitProd/TreeFiller/interface/FillerCaloMet.h"
13 > #include "MitProd/TreeFiller/interface/FillerCaloTaus.h"
14 > #include "MitProd/TreeFiller/interface/FillerCaloTowers.h"
15 > #include "MitProd/TreeFiller/interface/FillerConversions.h"
16 > #include "MitProd/TreeFiller/interface/FillerConversionsDecay.h"
17 > #include "MitProd/TreeFiller/interface/FillerDecayParts.h"
18 > #include "MitProd/TreeFiller/interface/FillerEmbedWeight.h"
19 > #include "MitProd/TreeFiller/interface/FillerElectrons.h"
20 > #include "MitProd/TreeFiller/interface/FillerEvtSelData.h"
21 > #include "MitProd/TreeFiller/interface/FillerGenJets.h"
22 > #include "MitProd/TreeFiller/interface/FillerGenMet.h"
23 > #include "MitProd/TreeFiller/interface/FillerJPTJets.h"
24 > #include "MitProd/TreeFiller/interface/FillerMCEventInfo.h"
25 > #include "MitProd/TreeFiller/interface/FillerMCParticles.h"
26 > #include "MitProd/TreeFiller/interface/FillerMCVertexes.h"
27 > #include "MitProd/TreeFiller/interface/FillerMet.h"
28   #include "MitProd/TreeFiller/interface/FillerMetaInfos.h"
29 < #include "MitProd/TreeFiller/interface/FillerGlobalMuons.h"
29 > #include "MitProd/TreeFiller/interface/FillerMetaInfos.h"
30 > #include "MitProd/TreeFiller/interface/FillerMuons.h"
31 > #include "MitProd/TreeFiller/interface/FillerPFCandidates.h"
32 > #include "MitProd/TreeFiller/interface/FillerPFJets.h"
33 > #include "MitProd/TreeFiller/interface/FillerPFMet.h"
34 > #include "MitProd/TreeFiller/interface/FillerPFTaus.h"
35 > #include "MitProd/TreeFiller/interface/FillerNSVFit.h"
36 > #include "MitProd/TreeFiller/interface/FillerPhotons.h"
37 > #include "MitProd/TreeFiller/interface/FillerPileupInfo.h"
38 > #include "MitProd/TreeFiller/interface/FillerPileupEnergyDensity.h"
39 > #include "MitProd/TreeFiller/interface/FillerPixelHits.h"
40 > #include "MitProd/TreeFiller/interface/FillerStableParts.h"
41 > #include "MitProd/TreeFiller/interface/FillerStripHits.h"
42 > #include "MitProd/TreeFiller/interface/FillerSuperClusters.h"
43 > #include "MitProd/TreeFiller/interface/FillerTracks.h"
44 > #include "MitProd/TreeFiller/interface/FillerTrackJets.h"
45 > #include "MitProd/TreeFiller/interface/FillerVertexes.h"
46 > #include "MitAna/DataTree/interface/Names.h"
47 > #include "MitAna/DataTree/interface/BranchTable.h"
48 > #include "MitCommon/OptIO/interface/OptInt.h"
49  
50   using namespace std;
51   using namespace edm;
52   using namespace mithep;
53  
54 < //-------------------------------------------------------------------------------------------------
55 < FillMitTree::FillMitTree(const edm::ParameterSet &cfg)
54 > mithep::ObjectService *mithep::FillMitTree::os_ = 0;
55 >
56 > //--------------------------------------------------------------------------------------------------
57 > FillMitTree::FillMitTree(const edm::ParameterSet &cfg) :
58 >  defactive_(cfg.getUntrackedParameter<bool>("defactive",1)),
59 >  brtable_(0),
60 >  acfnumber_(-1),
61 >  tws_(new TreeWriter(Names::gkEvtTreeName,0))
62   {
63 <  // Constructor: initialize fillers
63 >  // Constructor.
64  
65    if (!configure(cfg)) {
66      throw edm::Exception(edm::errors::Configuration, "FillMitTree::FillMitTree()\n")
# Line 22 | Line 68 | FillMitTree::FillMitTree(const edm::Para
68    }
69   }
70  
71 < //-------------------------------------------------------------------------------------------------
71 > //--------------------------------------------------------------------------------------------------
72   FillMitTree::~FillMitTree()
73   {
74 <  // Destructor: nothing to be done here.
74 >  // Destructor.
75 >
76 >  delete brtable_;
77 >  delete tws_;
78 > }
79 >
80 > //--------------------------------------------------------------------------------------------------
81 > bool FillMitTree::addActiveFiller(BaseFiller *bf)
82 > {
83 >  // Check if filler is active and add it to list of fillers. Otherwise delete it.
84 >
85 >  if (!bf)
86 >    return 0;
87 >
88 >  if (bf->Active()) {
89 >    fillers_.push_back(bf);
90 >    return 1;
91 >  }
92 >
93 >  delete bf;
94 >  bf = 0;
95 >  return 0;
96   }
97  
98 < //-------------------------------------------------------------------------------------------------
98 > //--------------------------------------------------------------------------------------------------
99 > void FillMitTree::beginRun(edm::Run const &run, edm::EventSetup const &setup)
100 > {
101 >  // Access and copy event content.
102 >
103 >  // first step: Loop over the data fillers of the various components
104 >  for (std::vector<BaseFiller*>::const_iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
105 >    (*iF)->FillRunBlock(run,setup);
106 >  }
107 >  
108 > }
109 >
110 > //--------------------------------------------------------------------------------------------------
111   void FillMitTree::analyze(const edm::Event      &event,
112                            const edm::EventSetup &setup)
113   {
114    // Access and copy event content.
115 +  
116 +  //tree writer begin event actions
117 +  tws_->BeginEvent(kTRUE);
118  
119 <  // First step: Loop over the data fillers of the various components
119 >  // first step: Loop over the data fillers of the various components
120    for (std::vector<BaseFiller*>::const_iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
121 +    //printf("%s FillDataBlock\n",(*iF)->Name().c_str());
122      (*iF)->FillDataBlock(event,setup);
123    }
124  
125 <  // Second step: Loop over the link resolution of the various components
125 >  // second step: Loop over the link resolution of the various components
126    for (std::vector<BaseFiller*>::const_iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
127 +    //printf("%s ResolveLinks\n",(*iF)->Name().c_str());
128      (*iF)->ResolveLinks(event,setup);
129    }
130 +
131 +  if (brtable_) { // only the first FillMitTree object has to deal with the branch table
132 +    if (acfnumber_==-1) {
133 +      brtable_->Rehash(brtable_->GetSize());
134 +      if (0)
135 +        brtable_->Print();
136 +    }
137 +    if (acfnumber_ != tws_->GetFileNumber()) {
138 +      tws_->StoreObject(brtable_);
139 +      acfnumber_ = tws_->GetFileNumber();
140 +    }
141 +  }
142 +
143 +  //tree writer end of event actions
144 +  tws_->EndEvent(kTRUE);
145   }
146  
147 < //-------------------------------------------------------------------------------------------------
148 < void FillMitTree::beginJob(const edm::EventSetup &event)
147 > //--------------------------------------------------------------------------------------------------
148 > void FillMitTree::beginJob()
149   {
150    // Access the tree and book branches.
151  
152 <  Service<TreeService> ts;
153 <  TreeWriter *tws = ts->get();
154 <  if (! tws) {
155 <    throw edm::Exception(edm::errors::Configuration, "FillMitTree::beginJob()\n")
156 <      << "Could not get pointer to tree." << "\n";
157 <    return;
152 >  if (os_==0) { // only the first FillMitTree object has to deal with this
153 >    Service<ObjectService> os;
154 >    if (!os.isAvailable()) {
155 >      throw edm::Exception(edm::errors::Configuration, "FillMitTree::beginJob()\n")
156 >        << "Could not get object service. "
157 >        << "Do you have the ObjectService defined in your config?" << "\n";
158 >      return;
159 >    }
160 >    os_ = &(*os);
161 >    brtable_ = new BranchTable;
162 >    brtable_->SetName(Names::gkBranchTable);
163 >    brtable_->SetOwner();
164 >    os->add(brtable_, brtable_->GetName());
165    }
166  
167 <  // Loop over the various components and book the branches
167 >  // loop over the various components and book the branches
168    for (std::vector<BaseFiller*>::iterator iF = fillers_.begin(); iF != fillers_.end(); ++iF) {
169 <    (*iF)->BookDataBlock(tws);
169 >    edm::LogInfo("FillMitTree::beginJob") << "Booking for " << (*iF)->Name() << endl;
170 >    (*iF)->BookDataBlock(*tws_);
171    }
172 <  return;
172 >
173 >  // call branch ref for the event tree
174 >  if (brtable_ && tws_->GetTree())
175 >    tws_->GetTree()->BranchRef();
176 >  
177   }
178  
179 < //-------------------------------------------------------------------------------------------------
179 > //--------------------------------------------------------------------------------------------------
180   bool FillMitTree::configure(const edm::ParameterSet &cfg)
181   {
71  // Configure our fillers.
182  
183 +  // Configure TreeWriter
184 +  const std::string twsConfigName("TreeWriter");
185 +  ParameterSet twsConfig;
186 +  if (cfg.existsAs<ParameterSet>(twsConfigName,0))
187 +    twsConfig = cfg.getUntrackedParameter<ParameterSet>(twsConfigName);
188 +  
189 +  configureTreeWriter(twsConfig);
190 +  
191 +  // Configure our fillers according to given parameter ("fillers").
192 +
193 +  std::vector<std::string> pars;
194 +  if (cfg.exists("fillers"))
195 +    pars=cfg.getUntrackedParameter<vector<string> >("fillers");
196 +  else
197 +    cfg.getParameterSetNames(pars, false);
198 +
199 +  // loop over psets
200 +  for (unsigned int i = 0; i<pars.size(); ++i) {
201 +
202 +    const string name(pars.at(i));
203 +
204 +    string ftype("Filler" + name);
205 +    if (cfg.existsAs<ParameterSet>(name,0)) {
206 +      ParameterSet next(cfg.getUntrackedParameter<ParameterSet>(name));
207 +      if (!next.exists("fillerType")) {
208 +        edm::LogError("FillMitTree") << "Cannot determine fillerType for pset named "
209 +                                     << name << std::endl;
210 +        throw edm::Exception(edm::errors::Configuration, "FillMitTree::configure\n")
211 +          << "Cannot determine fillerType for pset named "
212 +          << name << std::endl;
213 +      }
214 +      ftype = next.getUntrackedParameter<string>("fillerType");
215 +    }
216 +
217 +    edm::LogInfo("FillMitTree") << "Attempting to configure '" << ftype
218 +                                << "' for '" << name << "'" << std::endl;
219 +
220 +    if (ftype.compare("FillerMetaInfos")==0) {
221 +      FillerMetaInfos *fillerMetaInfos = new FillerMetaInfos(cfg, name.c_str(), defactive_);
222 +      addActiveFiller(fillerMetaInfos);
223 +      continue;
224 +    }
225 +
226 +    if (ftype.compare("FillerMCParticles")==0) {
227 +      FillerMCParticles *fillerMCParticles = new FillerMCParticles(cfg, name.c_str(), defactive_);
228 +      addActiveFiller(fillerMCParticles);
229 +      continue;
230 +    }
231 +
232 +    if (ftype.compare("FillerMCEventInfo")==0) {
233 +      FillerMCEventInfo *fillerMCEventInfo = new FillerMCEventInfo(cfg, name.c_str(), defactive_);
234 +      addActiveFiller(fillerMCEventInfo);
235 +      continue;
236 +    }
237 +
238 +    if (ftype.compare("FillerMCVertexes")==0) {
239 +      FillerMCVertexes *fillerMCVertexes = new FillerMCVertexes(cfg, name.c_str(), defactive_);
240 +      addActiveFiller(fillerMCVertexes);
241 +      continue;
242 +    }  
243 +
244 +    if (ftype.compare("FillerEvtSelData")==0) {
245 +      FillerEvtSelData *fillerEvtSelData = new FillerEvtSelData(cfg, name.c_str(), defactive_);
246 +      addActiveFiller(fillerEvtSelData);
247 +      continue;
248 +    }
249 +
250 +    if (ftype.compare("FillerBeamSpot")==0) {
251 +      FillerBeamSpot *fillerBeamSpot = new FillerBeamSpot(cfg, name.c_str(), defactive_);
252 +      addActiveFiller(fillerBeamSpot);
253 +      continue;
254 +    }
255 +
256 +    if (ftype.compare("FillerVertexes")==0) {
257 +      FillerVertexes *fillerVertexes = new FillerVertexes(cfg, name.c_str(), defactive_);
258 +      addActiveFiller(fillerVertexes);
259 +      continue;
260 +    }  
261 +
262 +    if (ftype.compare("FillerCaloTowers")==0) {
263 +      FillerCaloTowers *fillerCaloTowers = new FillerCaloTowers(cfg, name.c_str(), defactive_);
264 +      addActiveFiller(fillerCaloTowers);
265 +      continue;
266 +    }  
267 +
268 +    if (ftype.compare("FillerGenJets")==0) {
269 +      FillerGenJets *fillerGenJets = new FillerGenJets(cfg, name.c_str(), defactive_);
270 +      addActiveFiller(fillerGenJets);
271 +      continue;
272 +    }  
273 +
274 +    if (ftype.compare("FillerCaloJets")==0) {
275 +      FillerCaloJets *fillerCaloJets = new FillerCaloJets(cfg, name.c_str(), defactive_);
276 +      addActiveFiller(fillerCaloJets);
277 +      continue;
278 +    }  
279 +    
280 +    if (ftype.compare("FillerMet")==0) {
281 +      FillerMet *fillerMet = new FillerMet(cfg, name.c_str(), defactive_);
282 +      addActiveFiller(fillerMet);
283 +      continue;
284 +    }  
285 +    
286 +    if (ftype.compare("FillerGenMet")==0) {
287 +      FillerGenMet *fillerGenMet = new FillerGenMet(cfg, name.c_str(), defactive_);
288 +      addActiveFiller(fillerGenMet);
289 +      continue;
290 +    }  
291 +
292 +    if (ftype.compare("FillerCaloMet")==0) {
293 +      FillerCaloMet *fillerCaloMet = new FillerCaloMet(cfg, name.c_str(), defactive_);
294 +      addActiveFiller(fillerCaloMet);
295 +      continue;
296 +    }
297 +    
298 +    if (ftype.compare("FillerPFMet")==0) {
299 +      FillerPFMet *fillerPFMet = new FillerPFMet(cfg, name.c_str(), defactive_);
300 +      addActiveFiller(fillerPFMet);
301 +      continue;
302 +    }  
303 +
304 +    if (ftype.compare("FillerBasicClusters")==0) {
305 +      FillerBasicClusters *fillerBasicClusters =
306 +        new FillerBasicClusters(cfg, name.c_str(), defactive_);
307 +      addActiveFiller(fillerBasicClusters);
308 +      continue;
309 +    }  
310 +
311 +    if (ftype.compare("FillerSuperClusters")==0) {
312 +      FillerSuperClusters *fillerSuperClusters =  
313 +        new FillerSuperClusters(cfg, name.c_str(), defactive_);
314 +      addActiveFiller(fillerSuperClusters);
315 +      continue;
316 +    }  
317 +
318 +    if (ftype.compare("FillerPixelHits")==0) {
319 +      FillerPixelHits *fillerPixelHits =  
320 +        new FillerPixelHits(cfg, name.c_str(), defactive_);
321 +      addActiveFiller(fillerPixelHits);
322 +      continue;
323 +    }  
324 +
325 +    if (ftype.compare("FillerPileupInfo")==0) {
326 +      FillerPileupInfo *fillerPileupInfo =  
327 +        new FillerPileupInfo(cfg, name.c_str(), defactive_);
328 +      addActiveFiller(fillerPileupInfo);
329 +      continue;
330 +    }  
331 +
332 +    if (ftype.compare("FillerPileupEnergyDensity")==0) {
333 +      FillerPileupEnergyDensity *fillerPileupEnergyDensity =  
334 +        new FillerPileupEnergyDensity(cfg, name.c_str(), defactive_);
335 +      addActiveFiller(fillerPileupEnergyDensity);
336 +      continue;
337 +    }  
338 +
339 +    if (ftype.compare("FillerStripHits")==0) {
340 +      FillerStripHits *fillerStripHits =  
341 +        new FillerStripHits(cfg, name.c_str(), defactive_);
342 +      addActiveFiller(fillerStripHits);
343 +      continue;
344 +    }  
345 +
346 +    if (ftype.compare("FillerTracks")==0) {
347 +      FillerTracks *fillerTracks = new FillerTracks(cfg, name.c_str(), defactive_);
348 +      addActiveFiller(fillerTracks);
349 +      continue;
350 +    }  
351 +    if (ftype.compare("FillerMuons")==0) {
352 +      FillerMuons *fillerMuons = new FillerMuons(cfg, name.c_str(), defactive_);
353 +      addActiveFiller(fillerMuons);
354 +      continue;
355 +    }  
356 +    if (ftype.compare("FillerElectrons")==0) {
357 +      FillerElectrons *fillerElectrons = new FillerElectrons(cfg, name.c_str(), defactive_);
358 +      addActiveFiller(fillerElectrons);
359 +      continue;
360 +    }  
361 +    if (ftype.compare("FillerConversions")==0) {
362 +      FillerConversions *fillerConversions = new FillerConversions(cfg, name.c_str(), defactive_);
363 +      addActiveFiller(fillerConversions);
364 +      continue;
365 +    }
366 +    
367 +    if (ftype.compare("FillerConversionsDecay")==0) {
368 +      FillerConversionsDecay *fillerConversionsDecay = new FillerConversionsDecay(cfg, name.c_str(), defactive_);
369 +      addActiveFiller(fillerConversionsDecay);
370 +      continue;
371 +    }    
372 +
373 +    if (ftype.compare("FillerPhotons")==0) {
374 +      FillerPhotons *fillerPhotons = new FillerPhotons(cfg, name.c_str(), defactive_);
375 +      addActiveFiller(fillerPhotons);
376 +      continue;
377 +    }  
378 +
379 +    if (ftype.compare("FillerStableParts")==0) {
380 +      FillerStableParts *fillerStableParts = new FillerStableParts(cfg, name.c_str(), defactive_);
381 +      addActiveFiller(fillerStableParts);
382 +      continue;
383 +    }  
384 +
385 +    if (ftype.compare("FillerDecayParts")==0) {
386 +      FillerDecayParts *fillerDecayParts = new FillerDecayParts(cfg, name.c_str(), defactive_);
387 +      addActiveFiller(fillerDecayParts);
388 +      continue;
389 +    }  
390 +    
391 +    if (ftype.compare("FillerPFCandidates")==0) {
392 +      FillerPFCandidates *fillerPFCands = new FillerPFCandidates(cfg, name.c_str(), defactive_);
393 +      addActiveFiller(fillerPFCands);
394 +      continue;
395 +    }  
396 +    if (ftype.compare("FillerPFJets")==0) {
397 +      FillerPFJets *fillerPFJets = new FillerPFJets(cfg, name.c_str(), defactive_);
398 +      addActiveFiller(fillerPFJets);
399 +      continue;
400 +    }  
401 +    if (ftype.compare("FillerJPTJets")==0) {
402 +      FillerJPTJets *fillerJPTJets = new FillerJPTJets(cfg, name.c_str(), defactive_);
403 +      addActiveFiller(fillerJPTJets);
404 +      continue;
405 +    }  
406 +
407 +    if (ftype.compare("FillerCaloTaus")==0) {
408 +      FillerCaloTaus *fillerCaloTaus = new FillerCaloTaus(cfg, name.c_str(), defactive_);
409 +      addActiveFiller(fillerCaloTaus);
410 +      continue;
411 +    }
412 +    
413 +    if (ftype.compare("FillerPFTaus")==0) {
414 +      FillerPFTaus *fillerPFTaus = new FillerPFTaus(cfg, name.c_str(), defactive_);
415 +      addActiveFiller(fillerPFTaus);
416 +      continue;
417 +    }  
418 +
419 +    if (ftype.compare("FillerNSVFit")==0) {
420 +      FillerNSVFit *fillerNSVFit = new FillerNSVFit(cfg, name.c_str(), defactive_);
421 +      addActiveFiller(fillerNSVFit);
422 +      continue;
423 +    }  
424 +
425 +    if (ftype.compare("FillerTrackJets")==0) {
426 +      FillerTrackJets *fillerTrackJets = new FillerTrackJets(cfg, name.c_str(), defactive_);
427 +      addActiveFiller(fillerTrackJets);
428 +      continue;
429 +    }
430 +
431 +    if (ftype.compare("FillerEmbedWeight")==0) {
432 +      FillerEmbedWeight *fillerEmbedWeight = new FillerEmbedWeight(cfg, name.c_str(), defactive_);
433 +      addActiveFiller(fillerEmbedWeight);
434 +      continue;
435 +    }
436 +    
437 +    edm::LogError("FillMitTree")
438 +      << "Unknown fillerType " << ftype << " for pset named " << name << std::endl;
439 +    throw edm::Exception(edm::errors::Configuration, "FillMitTree::configure\n")
440 +      << "Unknown fillerType " << ftype << " for pset named " << name << std::endl;
441 +  }
442 +
443 +  return 1;
444 + }
445  
446 <  FillerMetaInfos *fillerMetaInfos = new FillerMetaInfos(cfg);
447 <  if (fillerMetaInfos->Active())
448 <    fillers_.push_back(fillerMetaInfos);
449 <  else
78 <    delete fillerMetaInfos;
79 <
80 <  FillerGlobalMuons *fillerGlobalMuons = new FillerGlobalMuons(cfg);
81 <  if (fillerGlobalMuons->Active())
82 <    fillers_.push_back(fillerGlobalMuons);
83 <  else
84 <    delete fillerGlobalMuons;
446 > //--------------------------------------------------------------------------------------------------
447 > bool FillMitTree::configureTreeWriter(const edm::ParameterSet &cfg)
448 > {
449 >  // Configure tree writer with options from config file.
450  
451 +  tws_->SetPrefix(cfg.getUntrackedParameter<string>("fileName","mit-test"));
452 +  tws_->SetBaseURL(cfg.getUntrackedParameter<string>("pathName","."));
453 +  tws_->SetMaxSize((Long64_t)cfg.getUntrackedParameter<unsigned>("maxSize",1024)*1024*1024);
454 +  tws_->SetCompressLevel(cfg.getUntrackedParameter<unsigned>("compLevel",9));
455 +  tws_->SetDefaultSL(cfg.getUntrackedParameter<unsigned>("splitLevel",99));
456 +  tws_->SetDefaultBrSize(cfg.getUntrackedParameter<unsigned>("brSize",16*1024));
457 +  
458 +  if (OptInt::IsActivated()) {
459 +    OptInt::SetZipMode(cfg.getUntrackedParameter<unsigned>("zipMode",99));
460 +    OptInt::SetGzipFraction(cfg.getUntrackedParameter<double>("gZipThres",1.0));
461 +    OptInt::SetBzipFraction(cfg.getUntrackedParameter<double>("bZipThres",-1.0));
462 +    OptInt::SetLzoFraction(cfg.getUntrackedParameter<double>("lzoThres",-1.0));
463 +    OptInt::SetLzmaFraction(cfg.getUntrackedParameter<double>("lzmaThres",0.95));
464 +    OptInt::SetVerbose(cfg.getUntrackedParameter<unsigned>("optIOVerbose",0));
465 +
466 +  } else {
467 +
468 +    if (cfg.exists("zipMode")   || cfg.exists("bZipThres") ||
469 +        cfg.exists("gZipThres") || cfg.exists("lzoThres")  ||
470 +        cfg.exists("lzmaThres")) {
471 +      edm::LogError("FillMitTree") <<
472 +        "OptIO interface not properly pre-loaded, ignoring given settings." << std::endl;
473 +    }
474 +  }
475 +  
476    return 1;
477   }
478  
479 < //-------------------------------------------------------------------------------------------------
479 > //--------------------------------------------------------------------------------------------------
480   void FillMitTree::endJob()
481   {
482    // Delete fillers.
# Line 95 | Line 485 | void FillMitTree::endJob()
485      delete *iF;
486    }
487  
488 +  tws_->Clear();
489 +  
490    edm::LogInfo("FillMitTree::endJob") << "Ending Job" << endl;
491   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines