|
Last change
on this file since 693 was 654, checked in by tbretz, 25 years ago |
|
*** empty log message ***
|
-
Property svn:executable
set to
*
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 2 | // //
|
|---|
| 3 | // MCT1Pedestals //
|
|---|
| 4 | // //
|
|---|
| 5 | /////////////////////////////////////////////////////////////////////////////
|
|---|
| 6 | #include "MCT1Pedestals.h"
|
|---|
| 7 |
|
|---|
| 8 | #include <fstream.h>
|
|---|
| 9 |
|
|---|
| 10 | #include "MLog.h"
|
|---|
| 11 |
|
|---|
| 12 | ClassImp(MCT1Pedestals)
|
|---|
| 13 |
|
|---|
| 14 | MCT1Pedestals::MCT1Pedestals(const char *name, const char *title)
|
|---|
| 15 | {
|
|---|
| 16 | *fName = name ? name : "MCT1Pedestals";
|
|---|
| 17 | *fTitle = title ? title : "Storage container for CT1 Pedestals";
|
|---|
| 18 |
|
|---|
| 19 | //
|
|---|
| 20 | // set the pedestals to default values
|
|---|
| 21 | //
|
|---|
| 22 | for (Int_t i = 0; i<127; i++ )
|
|---|
| 23 | fPedest[i] = 1.5;
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | void MCT1Pedestals::AsciiRead (ifstream &fin)
|
|---|
| 27 | {
|
|---|
| 28 | *fLog << "MCT1Pedestals::AsciiRead: Reading Pedestals..." << endl;
|
|---|
| 29 |
|
|---|
| 30 | Int_t dummyI;
|
|---|
| 31 | Float_t dummyF;
|
|---|
| 32 |
|
|---|
| 33 | //
|
|---|
| 34 | // skip the next 4 values
|
|---|
| 35 | //
|
|---|
| 36 | fin >> dummyF;
|
|---|
| 37 | fin >> dummyF;
|
|---|
| 38 | fin >> dummyF;
|
|---|
| 39 | fin >> dummyF;
|
|---|
| 40 |
|
|---|
| 41 | //
|
|---|
| 42 | // read in the next 127 numbers as the pedestals
|
|---|
| 43 | //
|
|---|
| 44 | for (Int_t i = 0; i<127; i++)
|
|---|
| 45 | {
|
|---|
| 46 | fin >> dummyF;
|
|---|
| 47 |
|
|---|
| 48 | if (dummyF > 0.0)
|
|---|
| 49 | fPedest[i] = dummyF;
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | fin >> dummyI;
|
|---|
| 53 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.