CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
BigEventsDebugger Class Reference

#include <myTKAnalyses/BigEventsDebugger/src/BigEventsDebugger.cc>

Inheritance diagram for BigEventsDebugger:
edm::EDAnalyzer

Public Member Functions

 BigEventsDebugger (const edm::ParameterSet &)
 
 ~BigEventsDebugger ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob (const edm::EventSetup &)
 
virtual void endJob ()
 

Private Attributes

std::vector< unsigned int > m_maskedmod
 
bool m_singleevents
 
TH2F * m_tecm2d
 
TProfile * m_tecmprof
 
TH2F * m_tecp2d
 
TProfile * m_tecpprof
 
TH2F * m_tib2d
 
TProfile * m_tibprof
 
TH2F * m_tob2d
 
TProfile * m_tobprof
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 53 of file BigEventsDebugger.cc.

Constructor & Destructor Documentation

BigEventsDebugger::BigEventsDebugger ( const edm::ParameterSet iConfig)
explicit

Definition at line 92 of file BigEventsDebugger.cc.

References combineCards::dirname, m_maskedmod, m_singleevents, m_tecm2d, m_tecmprof, m_tecp2d, m_tecpprof, m_tib2d, m_tibprof, m_tob2d, m_tobprof, TFileDirectory::make(), TFileDirectory::mkdir(), and python.multivaluedict::sort().

92  :
93  m_singleevents(iConfig.getParameter<bool>("singleEvents")),
94  m_maskedmod(iConfig.getUntrackedParameter<std::vector<unsigned int> >("maskedModules"))
95 
96 {
97  //now do what ever initialization is needed
98 
99  sort(m_maskedmod.begin(),m_maskedmod.end());
100 
102 
103  if(!m_singleevents) {
104  char dirname[500];
105  sprintf(dirname,"Summary");
106  TFileDirectory subd = tfserv->mkdir(dirname);
107 
108  //book histos
109 
110  m_tibprof = subd.make<TProfile>("tibprof","TIB Digi charge profile",256,-0.5,255.5);
111  m_tobprof = subd.make<TProfile>("tobprof","TOB Digi charge profile",256,-0.5,255.5);
112  m_tecpprof = subd.make<TProfile>("tecpprof","TECp Digi charge profile",256,-0.5,255.5);
113  m_tecmprof = subd.make<TProfile>("tecmprof","TECm Digi charge profile",256,-0.5,255.5);
114 
115  m_tib2d = subd.make<TH2F>("tib2d","TIB Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
116  m_tob2d = subd.make<TH2F>("tob2d","TOB Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
117  m_tecp2d = subd.make<TH2F>("tecp2d","TECp Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
118  m_tecm2d = subd.make<TH2F>("tecm2d","TECm Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
119 
120  }
121 
122 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< unsigned int > m_maskedmod
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
T * make() const
make new ROOT object
BigEventsDebugger::~BigEventsDebugger ( )

Definition at line 125 of file BigEventsDebugger.cc.

126 {
127 
128 
129  // do anything here that needs to be done at desctruction time
130  // (e.g. close files, deallocate resources etc.)
131 
132 }

Member Function Documentation

void BigEventsDebugger::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 141 of file BigEventsDebugger.cc.

References DigiCollectionProfiler::analyze(), combineCards::dirname, edm::EventID::event(), edm::Event::getByLabel(), edm::EventBase::id(), m_maskedmod, m_singleevents, m_tecm2d, m_tecmprof, m_tecp2d, m_tecpprof, m_tib2d, m_tibprof, m_tob2d, m_tobprof, TFileDirectory::mkdir(), edm::Event::run(), and DigiCollectionProfiler::setMaskedModules().

142 {
143  using namespace edm;
144 
146 
147  // create a folder for each event
148 
149  if(m_singleevents) {
150 
151  char dirname[500];
152  sprintf(dirname,"event_%u_%u",iEvent.run(),iEvent.id().event());
153  TFileDirectory subd = tfserv->mkdir(dirname);
154 
155  //book histos
156 
157  m_tibprof = subd.make<TProfile>("tibprof","TIB Digi charge profile",256,-0.5,255.5);
158  m_tobprof = subd.make<TProfile>("tobprof","TOB Digi charge profile",256,-0.5,255.5);
159  m_tecpprof = subd.make<TProfile>("tecpprof","TECp Digi charge profile",256,-0.5,255.5);
160  m_tecmprof = subd.make<TProfile>("tecmprof","TECm Digi charge profile",256,-0.5,255.5);
161 
162  m_tib2d = subd.make<TH2F>("tib2d","TIB Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
163  m_tob2d = subd.make<TH2F>("tob2d","TOB Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
164  m_tecp2d = subd.make<TH2F>("tecp2d","TECp Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
165  m_tecm2d = subd.make<TH2F>("tecm2d","TECm Digi charge distribution",256,-0.5,255.5,257,-0.5,256.5);
166 
167  }
168 
169  //analyze event
170 
172  m_tobprof,
173  m_tecpprof,
174  m_tecmprof,
175  m_tib2d,
176  m_tob2d,
177  m_tecp2d,
178  m_tecm2d);
179 
181  iEvent.getByLabel("siStripDigis","ZeroSuppressed",digis);
182  profiler.setMaskedModules(m_maskedmod);
183  profiler.analyze(digis);
184 
185 }
EventNumber_t event() const
Definition: EventID.h:44
std::vector< unsigned int > m_maskedmod
RunNumber_t run() const
Definition: Event.h:67
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
edm::EventID id() const
Definition: EventBase.h:56
void BigEventsDebugger::beginJob ( const edm::EventSetup )
privatevirtual

Definition at line 190 of file BigEventsDebugger.cc.

References m_maskedmod.

191 {
192  edm::LogInfo("MaskedModules") << m_maskedmod.size() << " masked modules ";
193  for(std::vector<unsigned int>::const_iterator it=m_maskedmod.begin();it!=m_maskedmod.end();it++) {
194  edm::LogVerbatim("MaskedModules") << (*it);
195  }
196 }
std::vector< unsigned int > m_maskedmod
void BigEventsDebugger::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 200 of file BigEventsDebugger.cc.

200  {
201 }

Member Data Documentation

std::vector<unsigned int> BigEventsDebugger::m_maskedmod
private

Definition at line 78 of file BigEventsDebugger.cc.

Referenced by analyze(), beginJob(), and BigEventsDebugger().

bool BigEventsDebugger::m_singleevents
private

Definition at line 66 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TH2F* BigEventsDebugger::m_tecm2d
private

Definition at line 76 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TProfile* BigEventsDebugger::m_tecmprof
private

Definition at line 71 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TH2F* BigEventsDebugger::m_tecp2d
private

Definition at line 75 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TProfile* BigEventsDebugger::m_tecpprof
private

Definition at line 70 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TH2F* BigEventsDebugger::m_tib2d
private

Definition at line 73 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TProfile* BigEventsDebugger::m_tibprof
private

Definition at line 68 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TH2F* BigEventsDebugger::m_tob2d
private

Definition at line 74 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().

TProfile* BigEventsDebugger::m_tobprof
private

Definition at line 69 of file BigEventsDebugger.cc.

Referenced by analyze(), and BigEventsDebugger().