EnglishJapanese Reload Front page List of pages Search Recent changes RSS of recent changes

Back to the top page

void RIDF2Histo(){

//Loading library.


// Create event store object

TArtEventStore *estore = new TArtEventStore();

// Open RIDF file


// Get pointer of raw event object.

TArtRawEventObject *rawevent = estore->GetRawEventObject();

// Create histogram

TH1F *h1 = new TH1F("name","title",100,0.,1000.);

// Loop for event block.
//To get next event block., use GetNextEvent function.


// Loop for segment block.
// To get number of segment including event block, use GetNumSeg function.

for(int i=0;i<rawevent->GetNumSeg();i++){

// Assign segment block to segment object by using GetSegment function.

TArtRawSegmentObject *seg = rawevent->GetSegment(i);

// Loop for data.
//To get number of data block, use GetNumData function.

for(int j=0;j<seg->GetNumData();j++){

//Assign data block to data object by using GetData function.
//And you can get each parameter using GetXX fuctions.

TArtRawDataObject *data = seg->GetData(j);

int geo = data->GetGeo() // Geometry address

int ch = data->GetCh() // Channel number

int val = data->GetVal() // Value



// Clear rawevent object




Last-modified: Sun, 28 Oct 2012 22:14:57 HADT (3250d)