AculConvert.h 1.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
////////////////////////////////////////////////////////////////////////
////																////
////	Class with functions converting the ACCULINNA raw format	////
////	to ROOT raw format (class AculRaw). Functions converting	////
////	particular file, particular folder and series of folders	////
////	are available.												////
////																////
////////////////////////////////////////////////////////////////////////


#pragma once
//#include "DllExport.h"

#include "AculRaw.h"

#include <TObject.h>
#include <TFile.h>
#include <TTree.h>
#include <TString.h>

#include <iostream>
#include <iomanip>
#include <fstream>

#define ENDOFEVENT		0xf0	//identifier of the end of one event
#define PERMPARNUMBER	10		//number of the permanent parameters in one event according to file protocol

using std::cout;
using std::endl;
using std::setw;


class /*DllExport*/ AculConvert
{

private:
	AculRaw		*fRawEvent;
	ofstream	fOutFaultFile;	//file for error output
	UInt_t		fMaskC3[BLOCKSNUMBER];

	//functions
	Int_t	ReadFileProtocol(const char* protocolname); //read file protocol and save mask values

public:
	AculConvert();
	virtual ~AculConvert();
	ClassDef(AculConvert, 1);

	//functions
	Int_t	ConvertRun(const char* runname, const Int_t nofirstfolder, const Int_t nolastfolder/*, const Char_t* runaddress = ""*/);			//convert more folders
	Int_t	ConvertFolder(const char* foldername);			//convert whole folder
	Int_t	ConvertFile(const char* datafile, TFile* rootRawFile = NULL);			//convert one file, zmenit vnitrni vypisy


};