--- chewbacca/event/PamelaRun.cpp 2008/12/18 14:47:09 1.2 +++ chewbacca/event/PamelaRun.cpp 2009/07/24 13:53:51 1.3 @@ -1,7 +1,7 @@ /** @file * $Author: mocchiut $ - * $Date: 2008/09/23 07:19:55 $ - * $Revision: 1.1.1.1 $ + * $Date: 2008/12/18 14:47:09 $ + * $Revision: 1.2 $ * * Implementation of the PamelaRun class. */ @@ -78,8 +78,8 @@ * @return int */ void PamelaRun::RunExists(std::string input) throw (std::exception){ - int res; - DIR *dirp; + // int res; + // DIR *dirp; std::string fileName; //std::string pathDir((char*)getenv("YODA_DATA")); std::string pathDir(GetPath()); @@ -316,7 +316,8 @@ SubPacket *packet = *(SubPacket**)subpacket; // look into the map of subpackets if we already read it. - std::string FullName = packet->GetPacketType()->GetName() + "." + name; + // std::string FullName = packet->GetPacketType()->GetName() + "." + name; + std::string FullName = (const std::string)packet->GetPacketType()->GetName() + "." + name; SubPacketMap::iterator i = SubPacketAddresses.find(FullName); if (i != SubPacketAddresses.end()) { // it is in the map *(SubPacket**)subpacket = i->second; @@ -389,7 +390,8 @@ FileName = GetFileName(packet, name); CreateDirectoryStructure(FileName.c_str()); File = new TFile(FileName.c_str(), "create"); - tree = new TTree(TreeName.c_str(), algo->GetAlgorithmName().c_str()); + // tree = new TTree(TreeName.c_str(), algo->GetAlgorithmName().c_str()); + tree = new TTree(TreeName.c_str(), algo->GetAlgorithmName()); WritingRootTrees[packet->GetPacketType()].push_back(tree); File->SetCompressionLevel(compression); @@ -419,7 +421,8 @@ oss << "Register: " << name << " for " << algo->GetAlgorithmName() << " (writing)"; //logger->debug(oss.str().c_str()); TTree* HeaderTree = ReadTTree(packet->GetPacketType()); - std::string FullName = packet->GetPacketType()->GetName() + "." + name; + // std::string FullName = packet->GetPacketType()->GetName() + "." + name; + std::string FullName = (const std::string)packet->GetPacketType()->GetName() + "." + name; if (Multiple) { TTree* tree = CreateTTree(algo, packet, name); oss.str(""); @@ -567,7 +570,7 @@ EventHeader header(type); std::string EventType = (&header)->GetPacketType()->GetName(); - // std::cout<SetCompressionLevel(compression); - tree = new TTree("Pscu", algo->GetAlgorithmName().c_str()); + // tree = new TTree("Pscu", algo->GetAlgorithmName().c_str()); + tree = new TTree("Pscu", algo->GetAlgorithmName()); WritingRootTrees[(&header)->GetPacketType()].push_back(tree); tree->GetCurrentFile()->cd(); tree->Branch(GetDefaultBranchName(&header).c_str(), @@ -593,11 +597,13 @@ SingleFile->SetCompressionLevel(compression); } - tree = new TTree(EventType.c_str(), algo->GetAlgorithmName().c_str()); + // tree = new TTree(EventType.c_str(), algo->GetAlgorithmName().c_str()); + tree = new TTree(EventType.c_str(), algo->GetAlgorithmName()); WritingRootTrees[type].push_back(tree); tree->GetCurrentFile()->cd(); - tree->Branch(GetDefaultBranchName(&header).c_str(), + tree->Branch(GetDefaultBranchName(&header).c_str(), (*subpacket)->Class()->GetName(), subpacket); + TTreeMap.insert(RootTreeMap::value_type(type, tree)); }