CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes
ME0Motherboard Class Reference

#include <ME0Motherboard.h>

Public Member Functions

void clear ()
 
std::vector< ME0TriggerDigigetTriggers ()
 
 ME0Motherboard (unsigned endcap, unsigned chamber, const edm::ParameterSet &conf)
 
 ME0Motherboard ()
 
std::vector< ME0TriggerDigireadoutTriggers ()
 
void run (const ME0PadDigiCollection *)
 
void setME0Geometry (const ME0Geometry *g)
 
 ~ME0Motherboard ()
 

Private Types

enum  { MAX_TRIGGER_BINS = 1, MAX_TRIGGERS = 8 }
 

Static Private Member Functions

static bool sortByME0Dphi (const ME0TriggerDigi &, const ME0TriggerDigi &)
 
static bool sortByQuality (const ME0TriggerDigi &, const ME0TriggerDigi &)
 

Private Attributes

int infoV
 
const ME0Geometryme0_g
 
const unsigned theChamber
 
const unsigned theEndcap
 
ME0TriggerDigi Triggers [MAX_TRIGGER_BINS][MAX_TRIGGERS]
 

Detailed Description

Definition at line 10 of file ME0Motherboard.h.

Member Enumeration Documentation

anonymous enum
private

Maximum number of time bins.

Enumerator
MAX_TRIGGER_BINS 
MAX_TRIGGERS 

Definition at line 51 of file ME0Motherboard.h.

Constructor & Destructor Documentation

ME0Motherboard::ME0Motherboard ( unsigned  endcap,
unsigned  chamber,
const edm::ParameterSet conf 
)

Normal constructor.

Definition at line 6 of file ME0Motherboard.cc.

References edm::ParameterSet::getParameter(), and infoV.

7  :
9 {
10  edm::ParameterSet tmbParams = conf.getParameter<edm::ParameterSet>("tmbParam");
11  infoV = tmbParams.getParameter<int>("verbosity");
12 }
T getParameter(std::string const &) const
const unsigned theEndcap
const unsigned theChamber
ME0Motherboard::ME0Motherboard ( )

Constructor for use during testing.

Definition at line 14 of file ME0Motherboard.cc.

References infoV.

14  :
15  theEndcap(1), theChamber(1)
16 {
17  infoV = 2;
18 }
const unsigned theEndcap
const unsigned theChamber
ME0Motherboard::~ME0Motherboard ( )

Default destructor.

Definition at line 20 of file ME0Motherboard.cc.

20  {
21 }

Member Function Documentation

void ME0Motherboard::clear ( void  )

Clears Triggers.

Definition at line 23 of file ME0Motherboard.cc.

References ME0TriggerDigi::clear(), mps_fire::i, MAX_TRIGGER_BINS, MAX_TRIGGERS, and Triggers.

Referenced by run(), and setME0Geometry().

24 {
25  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
26  for (int i = 0; i < MAX_TRIGGERS; i++) {
27  Triggers[bx][i].clear();
28  }
29  }
30 }
void clear()
clear this Trigger
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
std::vector< ME0TriggerDigi > ME0Motherboard::getTriggers ( )

Returns vector of all found correlated Triggers, if any.

Definition at line 53 of file ME0Motherboard.cc.

References mps_fire::i, MAX_TRIGGER_BINS, MAX_TRIGGERS, and Triggers.

Referenced by readoutTriggers(), and setME0Geometry().

54 {
55  std::vector<ME0TriggerDigi> tmpV;
56 
57  // Do not report Triggers found in ME1/A if mpc_block_me1/a is set.
58  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
59  for (int i = 0; i < MAX_TRIGGERS; i++) {
60  tmpV.push_back(Triggers[bx][i]);
61  }
62  }
63  return tmpV;
64 }
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
std::vector< ME0TriggerDigi > ME0Motherboard::readoutTriggers ( )

Returns vector of Triggers in the read-out time window, if any.

Definition at line 41 of file ME0Motherboard.cc.

References getTriggers().

Referenced by ME0TriggerBuilder::build(), and setME0Geometry().

42 {
43  std::vector<ME0TriggerDigi> tmpV;
44 
45  std::vector<ME0TriggerDigi> all_trigs = getTriggers();
46  for (auto ptrig = all_trigs.begin(); ptrig != all_trigs.end(); ptrig++) {
47  tmpV.push_back(*ptrig);
48  }
49  return tmpV;
50 }
std::vector< ME0TriggerDigi > getTriggers()
void ME0Motherboard::run ( const ME0PadDigiCollection )

Run function for normal usage.

Definition at line 33 of file ME0Motherboard.cc.

References clear().

Referenced by ME0TriggerBuilder::build(), and setME0Geometry().

34 {
35  clear();
36 }
void ME0Motherboard::setME0Geometry ( const ME0Geometry g)
inline

set geometry for the matching needs

Definition at line 24 of file ME0Motherboard.h.

References clear(), g, getTriggers(), me0_g, readoutTriggers(), and run().

Referenced by ME0TriggerBuilder::build().

24 { me0_g = g; }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const ME0Geometry * me0_g
bool ME0Motherboard::sortByME0Dphi ( const ME0TriggerDigi trig1,
const ME0TriggerDigi trig2 
)
staticprivate

Definition at line 73 of file ME0Motherboard.cc.

74 {
75  // todo: In the future I plan a member to be added to ME0TriggerDigi, getME0Dphi().
76  // That function will derive the bending angle from the pattern.
77  // The ME0TriggerDigi pattterns are at this point not defined yet.
78  return true;
79 }
bool ME0Motherboard::sortByQuality ( const ME0TriggerDigi trig1,
const ME0TriggerDigi trig2 
)
staticprivate

Definition at line 67 of file ME0Motherboard.cc.

References ME0TriggerDigi::getQuality().

68 {
69  return trig1.getQuality() > trig2.getQuality();
70 }
int getQuality() const
return the Quality

Member Data Documentation

int ME0Motherboard::infoV
private

Verbosity level: 0: no print (default). 1: print Triggers found.

Definition at line 42 of file ME0Motherboard.h.

Referenced by ME0Motherboard().

const ME0Geometry* ME0Motherboard::me0_g
private

Definition at line 48 of file ME0Motherboard.h.

Referenced by setME0Geometry().

const unsigned ME0Motherboard::theChamber
private

Definition at line 46 of file ME0Motherboard.h.

const unsigned ME0Motherboard::theEndcap
private

Chamber id (trigger-type labels).

Definition at line 45 of file ME0Motherboard.h.

ME0TriggerDigi ME0Motherboard::Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
private

Container for Triggers.

Definition at line 54 of file ME0Motherboard.h.

Referenced by clear(), and getTriggers().