test
CMS 3D CMS Logo

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

#include <DTLVStatus.h>

Public Types

typedef std::vector< std::pair
< DTLVStatusId, DTLVStatusData >
>::const_iterator 
const_iterator
 Access methods to data. More...
 

Public Member Functions

const_iterator begin () const
 
void clear ()
 reset content More...
 
 DTLVStatus ()
 
 DTLVStatus (const std::string &version)
 
const_iterator end () const
 
int get (int wheelId, int stationId, int sectorId, int &flagCFE, int &flagDFE, int &flagCMC, int &flagDMC) const
 get content More...
 
int get (const DTChamberId &id, int &flagCFE, int &flagDFE, int &flagCMC, int &flagDMC) const
 
void initialize ()
 
int set (int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
 
int set (const DTChamberId &id, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
 
int setFlagCFE (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagCFE (const DTChamberId &id, int flag)
 
int setFlagCMC (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagCMC (const DTChamberId &id, int flag)
 
int setFlagDFE (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagDFE (const DTChamberId &id, int flag)
 
int setFlagDMC (int wheelId, int stationId, int sectorId, int flag)
 
int setFlagDMC (const DTChamberId &id, int flag)
 
const std::string & version () const
 access version More...
 
std::string & version ()
 
 ~DTLVStatus ()
 

Private Member Functions

 DTLVStatus (DTLVStatus const &)
 
std::string mapName () const
 read and store full content More...
 
DTLVStatusoperator= (DTLVStatus const &)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< std::pair
< DTLVStatusId, DTLVStatusData > > 
dataList
 
std::string dataVersion
 
edm::ConstRespectingPtr
< DTBufferTree< int, int > > 
dBuf
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Description: Class to hold CCB status

Author
Paolo Ronchese INFN Padova

Definition at line 71 of file DTLVStatus.h.

Member Typedef Documentation

Access methods to data.

Definition at line 147 of file DTLVStatus.h.

Constructor & Destructor Documentation

DTLVStatus::DTLVStatus ( )

Constructor

Definition at line 33 of file DTLVStatus.cc.

References dataList.

33  :
34  dataVersion( " " ),
36  dataList.reserve( 10 );
37 }
std::string dataVersion
Definition: DTLVStatus.h:158
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
DTLVStatus::DTLVStatus ( const std::string &  version)

Definition at line 40 of file DTLVStatus.cc.

References dataList.

40  :
43  dataList.reserve( 10 );
44 }
const std::string & version() const
access version
Definition: DTLVStatus.cc:128
std::string dataVersion
Definition: DTLVStatus.h:158
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
DTLVStatus::~DTLVStatus ( )

Destructor

Definition at line 65 of file DTLVStatus.cc.

65  {
66 }
DTLVStatus::DTLVStatus ( DTLVStatus const &  )
private

Member Function Documentation

DTLVStatus::const_iterator DTLVStatus::begin ( void  ) const

Definition at line 342 of file DTLVStatus.cc.

References dataList.

342  {
343  return dataList.begin();
344 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
void DTLVStatus::clear ( void  )
DTLVStatus::const_iterator DTLVStatus::end ( void  ) const

Definition at line 347 of file DTLVStatus.cc.

References dataList.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

347  {
348  return dataList.end();
349 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
int DTLVStatus::get ( int  wheelId,
int  stationId,
int  sectorId,
int &  flagCFE,
int &  flagDFE,
int &  flagCMC,
int &  flagDMC 
) const

get content

Operations

Definition at line 80 of file DTLVStatus.cc.

References AlCaHLTBitMon_QueryRunRegistry::data, dataList, dBuf, DTBufferTree< Key, Content >::find(), DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, DTLVStatusData::flagDMC, and edm::second().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

86  {
87  flagCFE = 0;
88  flagDFE = 0;
89  flagCMC = 0;
90  flagDMC = 0;
91 
92  std::vector<int> chanKey;
93  chanKey.reserve(3);
94  chanKey.push_back( wheelId );
95  chanKey.push_back( stationId );
96  chanKey.push_back( sectorId );
97  int ientry;
98  int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry );
99  if ( !searchStatus ) {
100  const DTLVStatusData& data( dataList[ientry].second );
101  flagCFE = data.flagCFE;
102  flagDFE = data.flagDFE;
103  flagCMC = data.flagCMC;
104  flagDMC = data.flagDMC;
105  }
106 
107  return searchStatus;
108 
109 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
int DTLVStatus::get ( const DTChamberId id,
int &  flagCFE,
int &  flagDFE,
int &  flagCMC,
int &  flagDMC 
) const
void DTLVStatus::initialize ( )

Definition at line 359 of file DTLVStatus.cc.

References DTBufferTree< Key, Content >::clear(), dataList, dBuf, DTBufferTree< Key, Content >::insert(), and DTLVStatusId::stationId.

Referenced by clear().

359  {
360 
361  dBuf->clear();
362 
363  int entryNum = 0;
364  int entryMax = dataList.size();
365  std::vector<int> chanKey;
366  chanKey.reserve(3);
367  while ( entryNum < entryMax ) {
368 
369  const DTLVStatusId& chan = dataList[entryNum].first;
370 
371  chanKey.clear();
372  chanKey.push_back( chan. wheelId );
373  chanKey.push_back( chan.stationId );
374  chanKey.push_back( chan. sectorId );
375  dBuf->insert( chanKey.begin(), chanKey.end(), entryNum++ );
376 
377  }
378 
379  return;
380 
381 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
int insert(ElementKey fKey, ElementKey lKey, Content cont)
std::string DTLVStatus::mapName ( ) const
private

read and store full content

Definition at line 352 of file DTLVStatus.cc.

References dataVersion, and mergeVDriftHistosByStation::name.

352  {
353  std::stringstream name;
354  name << dataVersion << "_map_Mtime" << this;
355  return name.str();
356 }
std::string dataVersion
Definition: DTLVStatus.h:158
DTLVStatus& DTLVStatus::operator= ( DTLVStatus const &  )
private
template<class Archive >
void DTLVStatus::serialize ( Archive &  ar,
const unsigned int  version 
)
private
int DTLVStatus::set ( int  wheelId,
int  stationId,
int  sectorId,
int  flagCFE,
int  flagDFE,
int  flagCMC,
int  flagDMC 
)

Definition at line 145 of file DTLVStatus.cc.

References AlCaHLTBitMon_QueryRunRegistry::data, dataList, dBuf, DTBufferTree< Key, Content >::find(), DTLVStatusData::flagCFE, DTLVStatusData::flagCMC, DTLVStatusData::flagDFE, DTLVStatusData::flagDMC, DTBufferTree< Key, Content >::insert(), relval_steps::key, edm::second(), and DTLVStatusId::stationId.

Referenced by set(), setFlagCFE(), setFlagCMC(), setFlagDFE(), and setFlagDMC().

151  {
152 
153  std::vector<int> chanKey;
154  chanKey.reserve(3);
155  chanKey.push_back( wheelId );
156  chanKey.push_back( stationId );
157  chanKey.push_back( sectorId );
158  int ientry;
159  int searchStatus = dBuf->find( chanKey.begin(), chanKey.end(), ientry );
160 
161  if ( !searchStatus ) {
162  DTLVStatusData& data( dataList[ientry].second );
163  data.flagCFE = flagCFE;
164  data.flagDFE = flagDFE;
165  data.flagCMC = flagCMC;
166  data.flagDMC = flagDMC;
167  return -1;
168  }
169  else {
171  key. wheelId = wheelId;
172  key.stationId = stationId;
173  key. sectorId = sectorId;
175  data.flagCFE = flagCFE;
176  data.flagDFE = flagDFE;
177  data.flagCMC = flagCMC;
178  data.flagDMC = flagDMC;
179  ientry = dataList.size();
180  dataList.push_back( std::pair<DTLVStatusId,
181  DTLVStatusData>( key, data ) );
182  dBuf->insert( chanKey.begin(), chanKey.end(), ientry );
183  return 0;
184  }
185 
186  return 99;
187 
188 }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:160
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:162
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
int insert(ElementKey fKey, ElementKey lKey, Content cont)
int DTLVStatus::set ( const DTChamberId id,
int  flagCFE,
int  flagDFE,
int  flagCMC,
int  flagDMC 
)

Definition at line 191 of file DTLVStatus.cc.

References set(), and relativeConstraints::station.

195  {
196  return set( id.wheel(),
197  id.station(),
198  id.sector(),
199  flagCFE,
200  flagDFE,
201  flagCMC,
202  flagDMC );
203 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:145
int DTLVStatus::setFlagCFE ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 206 of file DTLVStatus.cc.

References set().

Referenced by setFlagCFE().

209  {
210  int flagCFE;
211  int flagDFE;
212  int flagCMC;
213  int flagDMC;
214  get( wheelId,
215  stationId,
216  sectorId,
217  flagCFE,
218  flagDFE,
219  flagCMC,
220  flagDMC );
221  return set( wheelId,
222  stationId,
223  sectorId,
224  flag,
225  flagDFE,
226  flagCMC,
227  flagDMC );
228 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:145
int DTLVStatus::setFlagCFE ( const DTChamberId id,
int  flag 
)

Definition at line 231 of file DTLVStatus.cc.

References setFlagCFE(), and relativeConstraints::station.

232  {
233  return setFlagCFE( id.wheel(),
234  id.station(),
235  id.sector(),
236  flag );
237 }
int setFlagCFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:206
int DTLVStatus::setFlagCMC ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 274 of file DTLVStatus.cc.

References set().

Referenced by setFlagCMC().

277  {
278  int flagCFE;
279  int flagDFE;
280  int flagCMC;
281  int flagDMC;
282  get( wheelId,
283  stationId,
284  sectorId,
285  flagCFE,
286  flagDFE,
287  flagCMC,
288  flagDMC );
289  return set( wheelId,
290  stationId,
291  sectorId,
292  flagCFE,
293  flagDFE,
294  flag,
295  flagDMC );
296 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:145
int DTLVStatus::setFlagCMC ( const DTChamberId id,
int  flag 
)

Definition at line 299 of file DTLVStatus.cc.

References setFlagCMC(), and relativeConstraints::station.

300  {
301  return setFlagCMC( id.wheel(),
302  id.station(),
303  id.sector(),
304  flag );
305 }
int setFlagCMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:274
int DTLVStatus::setFlagDFE ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 240 of file DTLVStatus.cc.

References set().

Referenced by setFlagDFE().

243  {
244  int flagCFE;
245  int flagDFE;
246  int flagCMC;
247  int flagDMC;
248  get( wheelId,
249  stationId,
250  sectorId,
251  flagCFE,
252  flagDFE,
253  flagCMC,
254  flagDMC );
255  return set( wheelId,
256  stationId,
257  sectorId,
258  flagCFE,
259  flag,
260  flagCMC,
261  flagDMC );
262 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:145
int DTLVStatus::setFlagDFE ( const DTChamberId id,
int  flag 
)

Definition at line 265 of file DTLVStatus.cc.

References setFlagDFE(), and relativeConstraints::station.

266  {
267  return setFlagDFE( id.wheel(),
268  id.station(),
269  id.sector(),
270  flag );
271 }
int setFlagDFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:240
int DTLVStatus::setFlagDMC ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 308 of file DTLVStatus.cc.

References set().

Referenced by setFlagDMC().

311  {
312  int flagCFE;
313  int flagDFE;
314  int flagCMC;
315  int flagDMC;
316  get( wheelId,
317  stationId,
318  sectorId,
319  flagCFE,
320  flagDFE,
321  flagCMC,
322  flagDMC );
323  return set( wheelId,
324  stationId,
325  sectorId,
326  flagCFE,
327  flagDFE,
328  flagCMC,
329  flag );
330 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:145
int DTLVStatus::setFlagDMC ( const DTChamberId id,
int  flag 
)

Definition at line 333 of file DTLVStatus.cc.

References setFlagDMC(), and relativeConstraints::station.

334  {
335  return setFlagDMC( id.wheel(),
336  id.station(),
337  id.sector(),
338  flag );
339 }
int setFlagDMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:308
const std::string & DTLVStatus::version ( ) const

access version

Definition at line 128 of file DTLVStatus.cc.

References dataVersion.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

128  {
129  return dataVersion;
130 }
std::string dataVersion
Definition: DTLVStatus.h:158
std::string & DTLVStatus::version ( )

Definition at line 133 of file DTLVStatus.cc.

References dataVersion.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

133  {
134  return dataVersion;
135 }
std::string dataVersion
Definition: DTLVStatus.h:158

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 168 of file DTLVStatus.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 168 of file DTLVStatus.h.

Member Data Documentation

std::vector< std::pair<DTLVStatusId,DTLVStatusData> > DTLVStatus::dataList
private

Definition at line 160 of file DTLVStatus.h.

Referenced by begin(), clear(), DTLVStatus(), end(), get(), initialize(), and set().

std::string DTLVStatus::dataVersion
private

Definition at line 158 of file DTLVStatus.h.

Referenced by mapName(), and version().

edm::ConstRespectingPtr<DTBufferTree<int,int> > DTLVStatus::dBuf
private

Definition at line 162 of file DTLVStatus.h.

Referenced by get(), initialize(), and set().