CSCEvent Class Reference
This class desribes one event, consisting of an array of CSCChamber objects.
More...
#include <CSCEvent.h>
List of all members.
Detailed Description
This class desribes one event, consisting of an array of CSCChamber objects.
Reading is done in 2 steps: First the event is read into a buffer, then the buffer is processed and the internal data structures are filled.
Access to the data is through the CSCChamber() objects. Starting form 0, here are GetNumChamber() chambers to loop over.
The event class also provides access to variables in the ATLAS header, such as GetNumSample().
Reconstruction results, however, are not part of the Event class.
- See also:
- CSCHit, CSCHitList.
- Status:
- 98% complete and well tested.
Constructor & Destructor Documentation
|
|
Constructor of the CSCEvent class.
This creates an empty event. |
Member Function Documentation
| int CSCEvent::GetAttenuation |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
Obtain pulser amplitude.
- Returns:
- the attenuation of the pulser: 0-63.
|
| unsigned int CSCEvent::GetBCID |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- returns the Beam Crossing ID number from the atlas header. This numbers least significant 3 bytes are repeated in the most significant 3 bytes: One ID comes from the TIM, and the other from the ROD
|
| int CSCEvent::GetCalEnable |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- the calibration pulser flag: 0-1.
|
| int CSCEvent::GetCalLayer |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- the bitmap of pulsed layers: 0-0x3f. bits 0-3 correspond to layer 0-3. bit4 is chamber A(small), bit5 is chamber B (large)
|
| CSCChamber* CSCEvent::GetChamber |
( |
int |
i |
) |
[inline] |
|
|
|
Provides access to the event data:.
- Parameters:
-
- Returns:
- a pointer to the chamber object, or NULL if i is out of range. The user should test the pointer to make sure that the pointer is not NULL before using the it.
|
| int CSCEvent::GetLatency |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- the SCA latency: 0-255.
|
| unsigned int CSCEvent::GetLevel1ID |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- returns the Level 1 ID number from the atlas header. This is the "event number".
|
| int CSCEvent::GetNeutron |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- the neutron rejection flag: 0-1.
|
| int CSCEvent::GetNumChamber |
( |
|
) |
[inline] |
|
|
|
- Returns:
- the number of chambers. this should be a multiple of 2, but chambers can be empty.
|
| int CSCEvent::GetNumSample |
( |
|
) |
[inline] |
|
|
|
- Returns:
- the number of samples, usually 4.
|
| unsigned int CSCEvent::GetNumStatus |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Parameters:
-
| rod | the rod number, this is the chamberNumber/2 |
- Returns:
- the number of StatusElements of the rod
|
| unsigned int CSCEvent::GetRunNumber |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- returns the run number from the atlas header
|
| int CSCEvent::GetSampling |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- the sampling frequency: 20 or 40 MHz.
|
| int CSCEvent::GetSparsification |
( |
int |
rod = 0 |
) |
[inline] |
|
|
|
- Returns:
- the sparsification flag: 0-1.
|
| unsigned int CSCEvent::GetStatusElement |
( |
int |
rod = 0, |
|
|
int |
i = 0 |
|
) |
[inline] |
|
|
|
- Parameters:
-
| rod | the rod number, this is the chamberNumber/2 |
| i | the number of the status word, ranging from 0 to GetNumStatus(rod) |
- Returns:
- the StatusElement of the rod
|
|
|
prints information about the event
This can be used for debugging or for converting events to ASCII. |
| int CSCEvent::ReadATLAS |
( |
FILE * |
infile, |
|
|
unsigned int * |
buf, |
|
|
int |
maxSize |
|
) |
|
|
|
|
read one entire ATLAS event into an (external) buffer.
This should be followed by a call to ReadCSC() to fill the data members of this class. For data from the eventbuilder, this includes the full event header. For data from the crate, this includes the ROS header. If the event is already in a buffer, skip this function and go to ReadCSC.
- Parameters:
-
| infile | is a FILE pointer to the raw data file |
| buf | The calling program should allocate the buffer. |
| maxSize | is the size of the buffer in words |
- Returns:
- Returns the number of words read, or 0 if there was an error. This size can be from the ATLAS event builder (in which case there can be several ROD fragments in this buffer), or from the ROS (which means that there is only one ROD fragment)
- See also:
- ReadCSC()
|
| int CSCEvent::ReadCSC |
( |
unsigned int * |
source, |
|
|
int |
size |
|
) |
|
|
|
|
Fills the internal data members of this class with event data.
- Parameters:
-
| source | a buffer with an atlas event. source has been filled by ReadATLAS() or the monitoring system. |
| size | the number of words in the source buffer. This is not the allocated size, but the actual number of words as returned by ReadAtlas(). |
- Returns:
- true of reading went ok, false otherwise. The return value should be used to validate the event: do not process the event if the return value is false.
- Note:
- Some events have no CSC ROD fragments. In this case, reading is succesful and TRUE is returned, but the GetNumChambers() of the event will be zero, indicating an empty event.
- See also:
- ReatATLAS()
|
The documentation for this class was generated from the following files:
Generated on Wed Oct 29 10:35:18 2008 for CSCRead by
1.3.9.1