CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 (DTLVStatus const &)=delete
 
 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 ()
 
DTLVStatusoperator= (DTLVStatus const &)=delete
 
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

std::string mapName () const
 read and store full content More...
 
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 63 of file DTLVStatus.h.

Member Typedef Documentation

Access methods to data.

Definition at line 100 of file DTLVStatus.h.

Constructor & Destructor Documentation

DTLVStatus::DTLVStatus ( )

Constructor

Definition at line 32 of file DTLVStatus.cc.

References dataList.

32 : dataVersion(" "), dBuf(new DTBufferTree<int, int>) { dataList.reserve(10); }
std::string dataVersion
Definition: DTLVStatus.h:107
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:111
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
DTLVStatus::DTLVStatus ( DTLVStatus const &  )
delete
DTLVStatus::DTLVStatus ( const std::string &  version)

Definition at line 34 of file DTLVStatus.cc.

References dataList.

35  dataList.reserve(10);
36 }
const std::string & version() const
access version
Definition: DTLVStatus.cc:83
std::string dataVersion
Definition: DTLVStatus.h:107
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:111
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
DTLVStatus::~DTLVStatus ( )

Destructor

Definition at line 45 of file DTLVStatus.cc.

45 {}

Member Function Documentation

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

Definition at line 184 of file DTLVStatus.cc.

References dataList.

184 { return dataList.begin(); }
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
void DTLVStatus::clear ( void  )

reset content

Definition at line 87 of file DTLVStatus.cc.

References dataList, and initialize().

Referenced by BeautifulSoup.Tag::setString().

87  {
88  dataList.clear();
89  initialize();
90  return;
91 }
void initialize()
Definition: DTLVStatus.cc:194
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
DTLVStatus::const_iterator DTLVStatus::end ( void  ) const

Definition at line 186 of file DTLVStatus.cc.

References dataList.

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

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

get content

Operations

Definition at line 54 of file DTLVStatus.cc.

References 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(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

55  {
56  flagCFE = 0;
57  flagDFE = 0;
58  flagCMC = 0;
59  flagDMC = 0;
60 
61  std::vector<int> chanKey;
62  chanKey.reserve(3);
63  chanKey.push_back(wheelId);
64  chanKey.push_back(stationId);
65  chanKey.push_back(sectorId);
66  int ientry;
67  int searchStatus = dBuf->find(chanKey.begin(), chanKey.end(), ientry);
68  if (!searchStatus) {
69  const DTLVStatusData& data(dataList[ientry].second);
70  flagCFE = data.flagCFE;
71  flagDFE = data.flagDFE;
72  flagCMC = data.flagCMC;
73  flagDMC = data.flagDMC;
74  }
75 
76  return searchStatus;
77 }
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:111
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int DTLVStatus::get ( const DTChamberId id,
int &  flagCFE,
int &  flagDFE,
int &  flagCMC,
int &  flagDMC 
) const
void DTLVStatus::initialize ( )

Definition at line 194 of file DTLVStatus.cc.

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

Referenced by clear().

194  {
195  dBuf->clear();
196 
197  int entryNum = 0;
198  int entryMax = dataList.size();
199  std::vector<int> chanKey;
200  chanKey.reserve(3);
201  while (entryNum < entryMax) {
202  const DTLVStatusId& chan = dataList[entryNum].first;
203 
204  chanKey.clear();
205  chanKey.push_back(chan.wheelId);
206  chanKey.push_back(chan.stationId);
207  chanKey.push_back(chan.sectorId);
208  dBuf->insert(chanKey.begin(), chanKey.end(), entryNum++);
209  }
210 
211  return;
212 }
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, &quot;NDC&quot;) lumi.SetBorderSize( 0 ) lumi...
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:111
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
int insert(ElementKey fKey, ElementKey lKey, Content cont)
std::string DTLVStatus::mapName ( ) const
private

read and store full content

Definition at line 188 of file DTLVStatus.cc.

References dataVersion, and mergeVDriftHistosByStation::name.

188  {
189  std::stringstream name;
190  name << dataVersion << "_map_Mtime" << this;
191  return name.str();
192 }
std::string dataVersion
Definition: DTLVStatus.h:107
DTLVStatus& DTLVStatus::operator= ( DTLVStatus const &  )
delete
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 93 of file DTLVStatus.cc.

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

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

93  {
94  std::vector<int> chanKey;
95  chanKey.reserve(3);
96  chanKey.push_back(wheelId);
97  chanKey.push_back(stationId);
98  chanKey.push_back(sectorId);
99  int ientry;
100  int searchStatus = dBuf->find(chanKey.begin(), chanKey.end(), ientry);
101 
102  if (!searchStatus) {
104  data.flagCFE = flagCFE;
105  data.flagDFE = flagDFE;
106  data.flagCMC = flagCMC;
107  data.flagDMC = flagDMC;
108  return -1;
109  } else {
111  key.wheelId = wheelId;
112  key.stationId = stationId;
113  key.sectorId = sectorId;
115  data.flagCFE = flagCFE;
116  data.flagDFE = flagDFE;
117  data.flagCMC = flagCMC;
118  data.flagDMC = flagDMC;
119  ientry = dataList.size();
120  dataList.push_back(std::pair<DTLVStatusId, DTLVStatusData>(key, data));
121  dBuf->insert(chanKey.begin(), chanKey.end(), ientry);
122  return 0;
123  }
124 
125  return 99;
126 }
edm::ConstRespectingPtr< DTBufferTree< int, int > > dBuf
Definition: DTLVStatus.h:111
int find(ElementKey fKey, ElementKey lKey, typename DTBufferTreeTrait< Content >::outputTypeOfConstFind &cont) const
U second(std::pair< T, U > const &p)
std::vector< std::pair< DTLVStatusId, DTLVStatusData > > dataList
Definition: DTLVStatus.h:109
tuple key
prepare the HTCondor submission files and eventually submit them
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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 128 of file DTLVStatus.cc.

References set(), and relativeConstraints::station.

128  {
129  return set(id.wheel(), id.station(), id.sector(), flagCFE, flagDFE, flagCMC, flagDMC);
130 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:93
int DTLVStatus::setFlagCFE ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 132 of file DTLVStatus.cc.

References set().

Referenced by setFlagCFE().

132  {
133  int flagCFE;
134  int flagDFE;
135  int flagCMC;
136  int flagDMC;
137  get(wheelId, stationId, sectorId, flagCFE, flagDFE, flagCMC, flagDMC);
138  return set(wheelId, stationId, sectorId, flag, flagDFE, flagCMC, flagDMC);
139 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:93
int DTLVStatus::setFlagCFE ( const DTChamberId id,
int  flag 
)

Definition at line 141 of file DTLVStatus.cc.

References setFlagCFE(), and relativeConstraints::station.

141  {
142  return setFlagCFE(id.wheel(), id.station(), id.sector(), flag);
143 }
int setFlagCFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:132
int DTLVStatus::setFlagCMC ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 158 of file DTLVStatus.cc.

References set().

Referenced by setFlagCMC().

158  {
159  int flagCFE;
160  int flagDFE;
161  int flagCMC;
162  int flagDMC;
163  get(wheelId, stationId, sectorId, flagCFE, flagDFE, flagCMC, flagDMC);
164  return set(wheelId, stationId, sectorId, flagCFE, flagDFE, flag, flagDMC);
165 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:93
int DTLVStatus::setFlagCMC ( const DTChamberId id,
int  flag 
)

Definition at line 167 of file DTLVStatus.cc.

References setFlagCMC(), and relativeConstraints::station.

167  {
168  return setFlagCMC(id.wheel(), id.station(), id.sector(), flag);
169 }
int setFlagCMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:158
int DTLVStatus::setFlagDFE ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 145 of file DTLVStatus.cc.

References set().

Referenced by setFlagDFE().

145  {
146  int flagCFE;
147  int flagDFE;
148  int flagCMC;
149  int flagDMC;
150  get(wheelId, stationId, sectorId, flagCFE, flagDFE, flagCMC, flagDMC);
151  return set(wheelId, stationId, sectorId, flagCFE, flag, flagCMC, flagDMC);
152 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:93
int DTLVStatus::setFlagDFE ( const DTChamberId id,
int  flag 
)

Definition at line 154 of file DTLVStatus.cc.

References setFlagDFE(), and relativeConstraints::station.

154  {
155  return setFlagDFE(id.wheel(), id.station(), id.sector(), flag);
156 }
int setFlagDFE(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:145
int DTLVStatus::setFlagDMC ( int  wheelId,
int  stationId,
int  sectorId,
int  flag 
)

Definition at line 171 of file DTLVStatus.cc.

References set().

Referenced by setFlagDMC().

171  {
172  int flagCFE;
173  int flagDFE;
174  int flagCMC;
175  int flagDMC;
176  get(wheelId, stationId, sectorId, flagCFE, flagDFE, flagCMC, flagDMC);
177  return set(wheelId, stationId, sectorId, flagCFE, flagDFE, flagCMC, flag);
178 }
int set(int wheelId, int stationId, int sectorId, int flagCFE, int flagDFE, int flagCMC, int flagDMC)
Definition: DTLVStatus.cc:93
int DTLVStatus::setFlagDMC ( const DTChamberId id,
int  flag 
)

Definition at line 180 of file DTLVStatus.cc.

References setFlagDMC(), and relativeConstraints::station.

180  {
181  return setFlagDMC(id.wheel(), id.station(), id.sector(), flag);
182 }
int setFlagDMC(int wheelId, int stationId, int sectorId, int flag)
Definition: DTLVStatus.cc:171
const std::string & DTLVStatus::version ( ) const

access version

Definition at line 83 of file DTLVStatus.cc.

References dataVersion.

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

83 { return dataVersion; }
std::string dataVersion
Definition: DTLVStatus.h:107
std::string & DTLVStatus::version ( )

Definition at line 85 of file DTLVStatus.cc.

References dataVersion.

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

85 { return dataVersion; }
std::string dataVersion
Definition: DTLVStatus.h:107

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 116 of file DTLVStatus.h.

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

Definition at line 116 of file DTLVStatus.h.

Member Data Documentation

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

Definition at line 109 of file DTLVStatus.h.

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

std::string DTLVStatus::dataVersion
private

Definition at line 107 of file DTLVStatus.h.

Referenced by mapName(), and version().

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

Definition at line 111 of file DTLVStatus.h.

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