ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/src/Analysis.cc
(Generate patch)

Comparing UserCode/MitAna/TreeMod/src/Analysis.cc (file contents):
Revision 1.12 by loizides, Thu Jul 3 08:22:19 2008 UTC vs.
Revision 1.17 by loizides, Wed Nov 5 17:23:47 2008 UTC

# Line 17 | Line 17
17   #include "MitAna/TAM/interface/TAModule.h"
18   #include "MitAna/TreeMod/interface/Selector.h"
19   #include "MitAna/TreeMod/interface/TreeLoader.h"
20 + #include "MitAna/TreeMod/interface/HLTFwkMod.h"
21 + #include "MitAna/Catalog/interface/Dataset.h"
22  
23   ClassImp(mithep::Analysis)
24  
# Line 25 | Line 27 | using namespace mithep;
27   //--------------------------------------------------------------------------------------------------
28   Analysis::Analysis(Bool_t useproof) :
29    fUseProof(useproof),
30 <  fHierachy(kTRUE),
30 >  fUseHLT(kTRUE),
31 >  fHierarchy(kTRUE),
32 >  fDoProxy(kTRUE),
33    fState(kPristine),
34    fNFriends(0),
35    fList(new TList),
# Line 193 | Line 197 | Bool_t Analysis::AddFiles(const char *pn
197   }
198  
199   //--------------------------------------------------------------------------------------------------
200 + Bool_t Analysis::AddDataset(const Dataset *dataset)
201 + {
202 +  // Add a full dataset to the analysis.
203 +
204 +  Bool_t status = true;
205 +
206 +  for (UInt_t i=0; i<dataset->NFiles(); i++)
207 +    status = (status && AddFile(dataset->FileUrl(i)));
208 +
209 +  return status;
210 + }
211 +
212 + //--------------------------------------------------------------------------------------------------
213   void Analysis::AddList(TList *list, Int_t eventlist)
214   {
215    // Add file name to the event list specified by eventlist. The lists are used to hold filenames of
# Line 313 | Line 330 | Bool_t Analysis::Init()
330    fLoaders->Add(bl);
331    fDeleteList->Add(bl);
332  
333 +  // create our HLT framework module
334 +  HLTFwkMod *hltmod = 0;
335 +  if (fUseHLT) {
336 +    hltmod = new HLTFwkMod;
337 +    fDeleteList->Add(hltmod);
338 +  }
339 +
340    if (fUseProof) {
341  
342 +    if (hltmod)
343 +      fProof->AddInput(hltmod);
344 +
345      fProof->AddInput(fSuperMod);
346      fLoaders->SetName("TAM_LOADERS");
347      fProof->AddInput(fLoaders);      
# Line 323 | Line 350 | Bool_t Analysis::Init()
350  
351      // when not running Proof, we must make a selector
352      fSelector = new Selector;
353 +    fSelector->SetDoProxy(fDoProxy);
354 +    if (hltmod)
355 +      fSelector->AddInput(hltmod);
356      fSelector->AddInput(fSuperMod);
357      MDB(kAnalysis, 2)
358        fSelector->SetVerbosity(1);
# Line 466 | Line 496 | void Analysis::Terminate()
496          MDB(kAnalysis, 1)
497            Info("Terminate", "Saving output to %s!", fAnaOutput.Data());
498  
499 <        if (fHierachy)
499 >        if (fHierarchy)
500            fOutput->Write(fOutput->GetName(),TObject::kSingleKey);      
501          else
502            fOutput->Write();
503                
504        }
505      }
506 +    // set state to terminate
507 +    fState = kTerminate;
508    }
509  
510    delete fChain;
511    delete fSet;
512    fDeleteList->Delete();
481
482  fState = kTerminate;
513   }
514  
515   //--------------------------------------------------------------------------------------------------

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines