ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
RPCbytestream Class Reference

#include <RPCbytestream.h>

Inheritance diagram for RPCbytestream:
Collaboration diagram for RPCbytestream:

Public Types

typedef unsigned long int debu
 
typedef std::map< int, CMAreadout, std::less< int > > CMA_Readout
 
typedef std::map< int, PADreadout, std::less< int > > PAD_Readout
 

Public Member Functions

 RPCbytestream (CMAdata &, const std::string &, MsgStream &, debu, debu, debu, debu, debu, debu, debu, debu, uint, uint)
 
 RPCbytestream (const RPCbytestream &)
 
 ~RPCbytestream ()
 
debu cma_ro_debug (void) const
 
debu pad_ro_debug (void) const
 
debu rx_ro_debug (void) const
 
debu sl_ro_debug (void) const
 
debu cma_rostruct_debug (void) const
 
debu pad_rostruct_debug (void) const
 
debu rx_rostruct_debug (void) const
 
debu sl_rostruct_debug (void) const
 
std::string filename (void) const
 
CMA_Readout cma_readout (void) const
 
PAD_Readout pad_readout (void) const
 
void set_number (int)
 
int number (void) const
 
void PrintElement (std::ostream &, std::string, bool) const
 
void Print (std::ostream &, bool) const
 
ObjectType tag () const
 
std::string name () const
 

Private Member Functions

void build_pad_readout (MsgStream &log, uint NOBXS)
 
void dump_rpc_bytestream (void)
 

Private Attributes

debu m_cma_ro_debug
 
debu m_pad_ro_debug
 
debu m_rx_ro_debug
 
debu m_sl_ro_debug
 
debu m_cma_rostruct_debug
 
debu m_pad_rostruct_debug
 
debu m_rx_rostruct_debug
 
debu m_sl_rostruct_debug
 
std::string m_filename
 
CMA_Readout m_cma_readout
 
PAD_Readout m_pad_readout
 
int m_number
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 19 of file RPCbytestream.h.

Member Typedef Documentation

◆ CMA_Readout

typedef std::map< int, CMAreadout, std::less <int> > RPCbytestream::CMA_Readout

Definition at line 23 of file RPCbytestream.h.

◆ debu

typedef unsigned long int RPCbytestream::debu

Definition at line 22 of file RPCbytestream.h.

◆ PAD_Readout

typedef std::map< int, PADreadout, std::less <int> > RPCbytestream::PAD_Readout

Definition at line 24 of file RPCbytestream.h.

Constructor & Destructor Documentation

◆ RPCbytestream() [1/2]

RPCbytestream::RPCbytestream ( CMAdata data,
const std::string &  filename,
MsgStream &  log,
debu  cma_debug,
debu  pad_debug,
debu  rx_debug,
debu  sl_debug,
debu  cma_struc_debug,
debu  pad_struc_debug,
debu  rx_struc_debug,
debu  sl_struc_debug,
uint  NOBXS,
uint  BCZERO 
)

Definition at line 13 of file RPCbytestream.cxx.

17  :
18  RPCtrigDataObject(0,"RPC byte stream"),
19  m_cma_ro_debug(cma_debug),
20  m_pad_ro_debug(pad_debug),
21  m_rx_ro_debug(rx_debug),
22  m_sl_ro_debug(sl_debug),
23  m_cma_rostruct_debug(cma_struc_debug),
24  m_pad_rostruct_debug(pad_struc_debug),
25  m_rx_rostruct_debug(rx_struc_debug),
26  m_sl_rostruct_debug(sl_struc_debug),
28 {
29  CMAdata::PatternsList list = data.give_patterns();
31 
32  while(it != list.end())
33  {
34  int key = (*it)->sector() * 10000 +
35  (*it)->cma_parameters().id().PAD_index() * 100 +
36  (*it)->cma_parameters().id().type() * 10 +
37  (*it)->cma_parameters().id().Ixx_index();
38 
39  std::pair < CMA_Readout::iterator, bool> ins =
40  m_cma_readout.insert(CMA_Readout::value_type(key,CMAreadout(*it, NOBXS, BCZERO)));
41  if(!ins.second)
42  {
43  log << MSG::ERROR << "Found duplicate CMA readout into CMA data!" << endmsg;
44  }
45 
46  ++it;
47  }
48 
49  build_pad_readout(log, NOBXS);
50  if(m_filename != "" ) dump_rpc_bytestream();
51 }

◆ RPCbytestream() [2/2]

RPCbytestream::RPCbytestream ( const RPCbytestream readout)

Definition at line 53 of file RPCbytestream.cxx.

53  :
54  RPCtrigDataObject(readout.number(),readout.name()),
55  m_cma_ro_debug(readout.cma_ro_debug()),
56  m_pad_ro_debug(readout.pad_ro_debug()),
57  m_rx_ro_debug(readout.rx_ro_debug()),
58  m_sl_ro_debug(readout.sl_ro_debug()),
63  m_filename(readout.filename()),
64  m_cma_readout(readout.cma_readout()),
65  m_pad_readout(readout.pad_readout())
66 {
67 }

◆ ~RPCbytestream()

RPCbytestream::~RPCbytestream ( )

Definition at line 70 of file RPCbytestream.cxx.

71 {
72  m_cma_readout.clear();
73 }

Member Function Documentation

◆ build_pad_readout()

void RPCbytestream::build_pad_readout ( MsgStream &  log,
uint  NOBXS 
)
private

Definition at line 77 of file RPCbytestream.cxx.

78 {
79  for (int i=0;i<64;++i)
80  {
81  for(int j=0;j<=10;++j) // 99 is the maximum number allowed
82  {
83  int kPAD_lw = i * 10000 + j * 100;
84  int kPAD_hg = i * 10000 + j * 100 + 99;
85 
86  CMA_Readout::iterator PAD_l = m_cma_readout.lower_bound(kPAD_lw);
87  CMA_Readout::iterator PAD_h = m_cma_readout.upper_bound(kPAD_hg);
88 
89  if(distance(PAD_l,PAD_h) )
90  {
91  int SLid = (*PAD_l).second.sector();
92  int PADid = (*PAD_l).second.id().PAD_index();
93  PADreadout pad_readout(SLid,PADid);
94 
95  int key = SLid * 100 + PADid;
96 
97  if(SLid != i)
98  {
99  log << MSG::ERROR << "Key doesn't correspond to CMA Sector Id!" << endmsg;
100  }
101 
102  for (CMA_Readout::iterator it = PAD_l; it != PAD_h; ++it)
103  {
104  auto cma_readout = (*it).second.give_matrix_readout(log, NOBXS);
105  pad_readout.load_readout(cma_readout);
106  if (log.level() <= MSG::DEBUG) {
107  log << MSG::DEBUG << "Dump of the matrices readout into PAD " << PADid
108  << endl
109  << cma_readout[0]
110  << cma_readout[1] << endmsg;
111  }
112  }
113 
114  std::pair < PAD_Readout::iterator, bool> ins =
115  m_pad_readout.insert(PAD_Readout::value_type(key,pad_readout));
116  if(!ins.second)
117  {
118  log << MSG::ERROR << "Found duplicate PAD readout into CMA data!" << endmsg;
119  }
120  }
121  }
122  }
123 }

◆ cma_readout()

CMA_Readout RPCbytestream::cma_readout ( void  ) const
inline

Definition at line 63 of file RPCbytestream.h.

63 {return m_cma_readout;}

◆ cma_ro_debug()

debu RPCbytestream::cma_ro_debug ( void  ) const
inline

Definition at line 51 of file RPCbytestream.h.

51 {return m_cma_ro_debug;}

◆ cma_rostruct_debug()

debu RPCbytestream::cma_rostruct_debug ( void  ) const
inline

Definition at line 56 of file RPCbytestream.h.

56 {return m_cma_rostruct_debug;}

◆ dump_rpc_bytestream()

void RPCbytestream::dump_rpc_bytestream ( void  )
private

Definition at line 126 of file RPCbytestream.cxx.

127 {
128  ofstream out;
129  out.open(m_filename.c_str(),ios::app);
130 
131  // dump the PAD chunk of data into the byte stream file
133  while(it != m_pad_readout.end())
134  {
135  PadReadOut* readout = (*it).second.give_pad_readout();
136 
137  readout->bytestream(out);
138 
139  out << endl;
140 
141  ++it;
142  }
143 }

◆ filename()

std::string RPCbytestream::filename ( void  ) const
inline

Definition at line 61 of file RPCbytestream.h.

61 {return m_filename;}

◆ name()

std::string BaseObject::name ( ) const
inlineinherited

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ number()

int RPCtrigDataObject::number ( void  ) const
inlineinherited

Definition at line 29 of file RPCtrigDataObject.h.

29 {return m_number;}

◆ pad_readout()

PAD_Readout RPCbytestream::pad_readout ( void  ) const
inline

Definition at line 64 of file RPCbytestream.h.

64 {return m_pad_readout;}

◆ pad_ro_debug()

debu RPCbytestream::pad_ro_debug ( void  ) const
inline

Definition at line 52 of file RPCbytestream.h.

52 {return m_pad_ro_debug;}

◆ pad_rostruct_debug()

debu RPCbytestream::pad_rostruct_debug ( void  ) const
inline

Definition at line 57 of file RPCbytestream.h.

57 {return m_pad_rostruct_debug;}

◆ Print()

void RPCtrigDataObject::Print ( std::ostream &  stream,
bool  detail 
) const
virtualinherited

Reimplemented from BaseObject.

Reimplemented in SLpatterns.

Definition at line 31 of file RPCtrigDataObject.cxx.

32 {
33  detail = true;
34  if(detail)
35  {
36  stream << name() << " number " << setw(3) << number();
37  }
38  stream << endl;
39 }

◆ PrintElement()

void RPCtrigDataObject::PrintElement ( std::ostream &  ,
std::string  ,
bool   
) const
inlineinherited

Definition at line 31 of file RPCtrigDataObject.h.

31 {}

◆ rx_ro_debug()

debu RPCbytestream::rx_ro_debug ( void  ) const
inline

Definition at line 53 of file RPCbytestream.h.

53 {return m_rx_ro_debug;}

◆ rx_rostruct_debug()

debu RPCbytestream::rx_rostruct_debug ( void  ) const
inline

Definition at line 58 of file RPCbytestream.h.

58 {return m_rx_rostruct_debug;}

◆ set_number()

void RPCtrigDataObject::set_number ( int  number)
inherited

Definition at line 42 of file RPCtrigDataObject.cxx.

43 {
44  m_number = number;
45 }

◆ sl_ro_debug()

debu RPCbytestream::sl_ro_debug ( void  ) const
inline

Definition at line 54 of file RPCbytestream.h.

54 {return m_sl_ro_debug;}

◆ sl_rostruct_debug()

debu RPCbytestream::sl_rostruct_debug ( void  ) const
inline

Definition at line 59 of file RPCbytestream.h.

59 {return m_sl_rostruct_debug;}

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22 { return m_tag; }

Member Data Documentation

◆ m_cma_readout

CMA_Readout RPCbytestream::m_cma_readout
private

Definition at line 39 of file RPCbytestream.h.

◆ m_cma_ro_debug

debu RPCbytestream::m_cma_ro_debug
private

Definition at line 27 of file RPCbytestream.h.

◆ m_cma_rostruct_debug

debu RPCbytestream::m_cma_rostruct_debug
private

Definition at line 32 of file RPCbytestream.h.

◆ m_filename

std::string RPCbytestream::m_filename
private

Definition at line 37 of file RPCbytestream.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_number

int RPCtrigDataObject::m_number
privateinherited

Definition at line 17 of file RPCtrigDataObject.h.

◆ m_pad_readout

PAD_Readout RPCbytestream::m_pad_readout
private

Definition at line 40 of file RPCbytestream.h.

◆ m_pad_ro_debug

debu RPCbytestream::m_pad_ro_debug
private

Definition at line 28 of file RPCbytestream.h.

◆ m_pad_rostruct_debug

debu RPCbytestream::m_pad_rostruct_debug
private

Definition at line 33 of file RPCbytestream.h.

◆ m_rx_ro_debug

debu RPCbytestream::m_rx_ro_debug
private

Definition at line 29 of file RPCbytestream.h.

◆ m_rx_rostruct_debug

debu RPCbytestream::m_rx_rostruct_debug
private

Definition at line 34 of file RPCbytestream.h.

◆ m_sl_ro_debug

debu RPCbytestream::m_sl_ro_debug
private

Definition at line 30 of file RPCbytestream.h.

◆ m_sl_rostruct_debug

debu RPCbytestream::m_sl_rostruct_debug
private

Definition at line 35 of file RPCbytestream.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
RPCbytestream::filename
std::string filename(void) const
Definition: RPCbytestream.h:61
RPCbytestream::m_pad_ro_debug
debu m_pad_ro_debug
Definition: RPCbytestream.h:28
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
RPCtrigDataObject::m_number
int m_number
Definition: RPCtrigDataObject.h:17
RPCtrigDataObject::RPCtrigDataObject
RPCtrigDataObject(int, const std::string &)
Definition: RPCtrigDataObject.cxx:10
PadReadOut::bytestream
void bytestream(std::ostream &stream)
Definition: PadReadOut.cxx:167
RPCbytestream::rx_ro_debug
debu rx_ro_debug(void) const
Definition: RPCbytestream.h:53
RPCbytestream::m_sl_ro_debug
debu m_sl_ro_debug
Definition: RPCbytestream.h:30
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
RPCbytestream::pad_rostruct_debug
debu pad_rostruct_debug(void) const
Definition: RPCbytestream.h:57
RPCbytestream::rx_rostruct_debug
debu rx_rostruct_debug(void) const
Definition: RPCbytestream.h:58
skel.it
it
Definition: skel.GENtoEVGEN.py:423
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
CMAreadout
Definition: CMAreadout.h:23
RPCbytestream::m_cma_readout
CMA_Readout m_cma_readout
Definition: RPCbytestream.h:39
detail
Definition: extract_histogram_tag.cxx:14
RPCbytestream::dump_rpc_bytestream
void dump_rpc_bytestream(void)
Definition: RPCbytestream.cxx:126
RPCbytestream::cma_rostruct_debug
debu cma_rostruct_debug(void) const
Definition: RPCbytestream.h:56
PADreadout
Definition: PADreadout.h:20
RPCbytestream::build_pad_readout
void build_pad_readout(MsgStream &log, uint NOBXS)
Definition: RPCbytestream.cxx:77
RPCbytestream::pad_readout
PAD_Readout pad_readout(void) const
Definition: RPCbytestream.h:64
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
RPCbytestream::m_rx_ro_debug
debu m_rx_ro_debug
Definition: RPCbytestream.h:29
RPCbytestream::m_sl_rostruct_debug
debu m_sl_rostruct_debug
Definition: RPCbytestream.h:35
PadReadOut
Definition: PadReadOut.h:15
CMAdata::PatternsList
std::list< CMApatterns * > PatternsList
Definition: CMAdata.h:22
RPCbytestream::m_pad_rostruct_debug
debu m_pad_rostruct_debug
Definition: RPCbytestream.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
RPCbytestream::cma_ro_debug
debu cma_ro_debug(void) const
Definition: RPCbytestream.h:51
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
RPCbytestream::cma_readout
CMA_Readout cma_readout(void) const
Definition: RPCbytestream.h:63
BaseObject::name
std::string name() const
Definition: BaseObject.h:23
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
RPCbytestream::m_filename
std::string m_filename
Definition: RPCbytestream.h:37
RPCbytestream::m_rx_rostruct_debug
debu m_rx_rostruct_debug
Definition: RPCbytestream.h:34
RPCbytestream::m_cma_ro_debug
debu m_cma_ro_debug
Definition: RPCbytestream.h:27
RPCbytestream::sl_ro_debug
debu sl_ro_debug(void) const
Definition: RPCbytestream.h:54
RPCtrigDataObject::number
int number(void) const
Definition: RPCtrigDataObject.h:29
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
RPCbytestream::m_pad_readout
PAD_Readout m_pad_readout
Definition: RPCbytestream.h:40
RPCbytestream::sl_rostruct_debug
debu sl_rostruct_debug(void) const
Definition: RPCbytestream.h:59
RPCbytestream::m_cma_rostruct_debug
debu m_cma_rostruct_debug
Definition: RPCbytestream.h:32
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
RPCbytestream::pad_ro_debug
debu pad_ro_debug(void) const
Definition: RPCbytestream.h:52
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37