StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjBEMCTowerMaker.cxx
1 // $Id: StjBEMCTowerMaker.cxx,v 1.4 2010/05/30 07:10:00 pibero Exp $
2 #include "StjBEMCTowerMaker.h"
3 
4 
5 #include "StjTowerEnergyCut2003BemcTower.h"
6 #include "StjTowerEnergyCutBemcWestOnly.h"
7 #include "StjTowerEnergyCutEnergy.h"
8 #include "StjTowerEnergyCutBemcStatus.h"
9 #include "StjTowerEnergyCutAdc.h"
10 
11 #include "StjTowerEnergyListWriter.h"
12 
13 #include "StjBEMCMuDst.h"
14 #include "StjTowerEnergyListCut.h"
15 #include "StjBEMCTxt.h"
16 
17 #include <TDirectory.h>
18 
19 #include <iostream>
20 
21 using namespace std;
22 
23 ClassImp(StjBEMCTowerMaker)
24 
25 
26 StjBEMCTowerMaker::StjBEMCTowerMaker(const Char_t *name, TDirectory* file, StMuDstMaker* uDstMaker)
27  : StMaker(name)
28  , _file(file)
29  , _uDstMaker(uDstMaker)
30 { }
31 
32 Int_t StjBEMCTowerMaker::Init()
33 {
34  _bemc = new StjBEMCMuDst;
35  // _bemc = new StjBEMCNull();
36  // _bemc = new StjBEMCTxt("./testStJetMaker/bemcenergy.txt");
37 
38  _bemcCut = new StjTowerEnergyListCut();
39  _bemcCut->addCut(new StjTowerEnergyCutBemcWestOnly());
40  _bemcCut->addCut(new StjTowerEnergyCutEnergy());
41  _bemcCut->addCut(new StjTowerEnergyCutBemcStatus());
42  _bemcCut->addCut(new StjTowerEnergyCutAdc());
43 
44  _writer = new StjTowerEnergyListWriter("bemcTowers", _file);
45 
46  return kStOk;
47 }
48 
50 {
51  StjTowerEnergyList energyList = _bemc->getEnergyList();
52 
53  energyList = (*_bemcCut)(energyList);
54 
55  _writer->Fill(energyList);
56 
57  return kStOk;
58 
59 }
60 
62 {
63  _writer->Finish();
64 
65  return kStOk;
66 }
Definition: Stypes.h:41