#ifndef CALDATANTUPLIZER_HH #define CALDATANTUPLIZER_HH ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Component: CalDataNtuplizer.hh // Purpose: Puts contents of a CalData in a Heptuple block // // Created: ~07/06/01 Pierre Savard // // History: /////////////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include "CalorGeometry/CalConstants.hh" class HepNtuple; class CalData; class CalDataNtuplizer { public: CalDataNtuplizer(HepNtuple* ntuple, std::string branch_name); virtual ~CalDataNtuplizer() {} virtual bool initialize(double lvl); virtual bool capture(const CalData& object); //Limit to number of towers, needed to initialize ntuple block enum { MAXTOWERS = NCALCELLS }; protected: //Capture variables int _ntowers; int _ieta[MAXTOWERS]; int _iphi[MAXTOWERS]; int _type[MAXTOWERS]; float _emEnergy[MAXTOWERS]; float _hadEnergy[MAXTOWERS]; int _tdcNhits[MAXTOWERS]; int _tdcTime0[MAXTOWERS]; int _tdcTime1[MAXTOWERS]; float _cemE[MAXTOWERS][2]; float _chaE[MAXTOWERS][2]; float _whaE[MAXTOWERS][2]; float _pemE[MAXTOWERS][2]; float _phaE[MAXTOWERS][2]; float _pprE[MAXTOWERS][2]; int _cemT[MAXTOWERS][2]; int _pemT[MAXTOWERS][2]; int _chaT[MAXTOWERS][2]; int _whaT[MAXTOWERS][2]; int _phaT[MAXTOWERS][2]; //Ntuple/branch hooks HepNtuple* _ntuple; std::string _branch_name; private: double _lvl; }; #endif